package com.agadmin.controller;

import com.agadmin.manage.UserManager;
import com.agadmin.request.login.UserRequest;
import com.agadmin.response.login.RegistryResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/auth")
@Slf4j
public class RegistryController {
    @Autowired
    UserManager userManager;
    @PostMapping("/registry")
    public RegistryResponse registryAccount(@RequestBody UserRequest req ){
        RegistryResponse res = userManager.registry(req);
        return res;
    }
}
